package com.pig4cloud.pigx.contract.mapstruct;

import com.pig4cloud.pigx.contract.bo.ContractPositionCrossCalculateBO;
import com.pig4cloud.pigx.contract.bo.ContractPositionLiquidatorBO;
import com.pig4cloud.pigx.contract.entity.ContractPosition;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ContractStopOrderStruct
 *
 * @date 2022/8/12 16:32
 */
@Mapper
public interface ContractPositionStruct {
    ContractPositionStruct INSTANCE = Mappers.getMapper(ContractPositionStruct.class);

    /**
     * 将实体类转换为ContractPositionLiquidatorBO
     *
     * @param entity 实体类
     * @return {@link ContractPositionLiquidatorBO}
     * @date 2022/2/8
     * @since 1.0.0
     */
    @Mappings({})
    ContractPositionLiquidatorBO entity2LiquidatorBO(ContractPosition entity);

    /**
     * 将实体类list转换为List<ContractPositionCrossCalculateBO>
     *
     * @param list list
     * @return {@link List< ContractPositionCrossCalculateBO>}
     * @date 2022/2/8
     * @since 1.0.0
     */
    @Mappings({})
    List<ContractPositionCrossCalculateBO> list2CrossCalculateBOList(List<ContractPosition> list);
}
